﻿using StringLibrary;
using System;
using System.Collections.Generic;
using UtilityLibraries;
using ZMHHelloWorld4NetCore.Pets;

namespace ZMHHelloWorld4NetCore
{
    class Program
    {
        static void Main(string[] args)
        {
            //Console.WriteLine("Hello World!");
            //Console.WriteLine("\nWhat is your name? ");
            //var name = Console.ReadLine();
            //var date = DateTime.Now;
            //Console.WriteLine($"\nHello, {name}, on {date:d} at {date:t}!");
            //Console.Write("\nPress any key to exit...");
            //Console.ReadKey(true);


            //int row = 0;

            //do
            //{
            //    if (row == 0 || row >= 25)
            //        ResetConsole();

            //    string input = Console.ReadLine();
            //    if (String.IsNullOrEmpty(input)) break;
            //    Console.WriteLine($"Input: {input} {"Begins with uppercase? ",30}: " +
            //                      $"{(input.StartsWithUpper() ? "Yes" : "No")}\n");
            //    row += 3;
            //} while (true);
            //return;

            //// Declare a ResetConsole local method
            //void ResetConsole()
            //{
            //    if (row > 0)
            //    {
            //        Console.WriteLine("Press any key to continue...");
            //        Console.ReadKey();
            //    }
            //    Console.Clear();
            //    Console.WriteLine("\nPress <Enter> only to exit; otherwise, enter a string and press <Enter>:\n");
            //    row = 3;
            //}

            //Console.WriteLine($"The answer is {new Thing().Get(42)}.");
            //Console.ReadKey(true);


            List<IPet> pets = new List<IPet>
            {
                new Dog(),
                new Cat(),
                new Bird()
            };

            foreach (var pet in pets)
            {
                Console.WriteLine(pet.TalkToOwner());
            }
        }
    }
}
